package ar.edu.unicen.pladema.vc1.formats.hgt;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class LoadHGT {
	public static void main(final String [] args) {
		DataInputStream in;
		try {
			in = new DataInputStream(new FileInputStream("/home/apps/desarrollo/workspace-swt/Visualizacion/resources/HGT/S38W060.M01"));
			System.out.println("Bytes skipped: " + in.skipBytes(4));
			System.out.println(in.readInt());
			System.out.println(in.readLong());
			System.out.println(in.readLong());
			int i = (in.readByte()) | (in.readByte() << 8) | (in.readByte() << 16) | (in.readByte() << 24);
			System.out.println(i);
			i = (in.readByte() << 24) | (in.readByte() << 16) | (in.readByte() << 8) | (in.readByte());
			System.out.println(i);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		

		
	}
}
